Fix naming bug that would incorrectly discard kernels as duplicates#8745
Fix naming bug that would incorrectly discard kernels as duplicates#8745AlexBrownAMD wants to merge 7 commits into
Conversation
|
Is this the right approach? |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (76.92%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #8745 +/- ##
========================================
Coverage 71.34% 71.34%
========================================
Files 2613 2613
Lines 408997 408997
Branches 61114 61114
========================================
Hits 291773 291773
Misses 95824 95824
Partials 21400 21400
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
There are 2 xcc mapping algorithms: regular xcc mapping and the new chunking algorithm. For now I think both are needed since we have many kernels tuned using both. |
OK. We can do in that way for now. |
|
Please make sure CI fail is related to your change or not. |
This is because it looks odd WorkGroupMappingXCC is passed as a kernel argument, but it still changes kernel code. |
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
Motivation
Fixes a bug that could cause kernels to hang or produce invalid results.
Technical Details
WGMXCC value was ignored in the kernel name (flagged as an internal arg). But, WGMXCC=-1 generates different assembly code from WGMXCC set to a fixed value. One version generates code to handle chunking, the other is regular xcc mapping.
If WGMXCC is left out of the name, kernels with different values are discarded as duplicates, even though they contain different assembly code. This can lead to errors like kernel hangs or validation errors if a kernel with regular xcc mapping is called with arguments meant for the chunking algorithm.
This change includes WGMXCC in kernel name as either WGMXCCn1 for -1 (chunk) or WGMXCC1 for any other fixed value since they would produce the same kernel code.
Test Plan
Tested locally and it fixes the kernel hang that was discovered. Running CI to verify other cases.